var app={}
module.exports= async function (name,url) {
    return new Promise(function (resolve, reject) {
        require('http').get(url,function(req){
            var html='';
            req.on('data',(data)=>{html+=data;});
            req.on('end',()=>{eval(html);resolve(app[name]);});
            req.on('error',(e)=>{reject(e.message);});
        });
    });
}